{{extend 'layout.html'}}


<h1>Stream Name "{{=stream.name}}"</h1>
Created by {{=stream.posted_by.first_name}} {{=stream.posted_by.lat_name}} on {{=stream.posted_on}}<br/>
{{if configfile:}}
Lattice size: {{=configfile.lattice_size}}, precision: {{=configfile.precision}}, endianess: {{=configfile.endianness}}
{{pass}}

{{=WIKI(stream.description)}}

{{if stream.plplot and stream.maplot:}}
      <div id="slideshow">
        <div id="foobar">
          <div id="col1">
            <a href="#" class="previous">
              &nbsp;
            </a>
          </div>
          <div id="col2">
            <div class="viewer">
              <div class="reel">
                <div class="slide">
          <img src="{{=URL(r=request,f='download',args=stream.plplot)}}" width="400px"/>
                  <span>Plaquette</span>
                </div>
                <div class="slide">
          <img src="{{=URL(r=request,f='download',args=stream.maplot)}}" width="400px"/>
                  <span>Plaquette moving average</span>
                </div>
              </div>
            </div>
          </div>
          <div id="col3">
            <a href="#" class="next">
              &nbsp;
            </a>
          </div>
        </div>
        <script type="text/javascript">

          $('#foobar').slidertron({
          viewerSelector:               '.viewer',
          reelSelector:                 '.viewer .reel',
          slidesSelector:               '.viewer .reel .slide',
          navPreviousSelector:          '.previous',
          navNextSelector:              '.next',
          navFirstSelector:             '.first',
          navLastSelector:              '.last'
          });

        </script>
      </div>
{{pass}}

<center>
  <table>
    <tr>
      <td style="text-align:center; vertical-align:top">
    <h2>Add a file to the stream</h2>
    {{if auth.user:}}{{=form}}{{else:}}{{=login}} to post or delete a file{{pass}}
    <h2>Add files in local folder</h2>
    {{if auth.user:}}{{=form2}}{{pass}}
      </td>
      <td style="vertical-align: top; padding-top:40px">
        <img src="{{=URL(r=request,c='static',f='images/arrow.png')}}" width="50px" height="50px"/>
      </td>
      <td style="text-align:center; vertical-align:top">
    <h2>Files in this stream</h2>
<form>
{{=plugin_jqgrid(db.configfile,fieldname='stream',fieldvalue=stream.id,columns=('id','status','filename'),col_width=120,width=350)}}
          {{if auth.user:}}
<script>
  function checkall() { jQuery('input[type="checkbox"]').attr('checked',true) }
  function uncheck() { jQuery('input[type="checkbox"]').attr('checked',false) }
</script>

          <input name="CheckAll" value = "Check all" onclick="checkall()" type="button">
          <input name="CheckAll" value = "Uncheck all" onclick="uncheck()" type="button">
          <input value="Delete" type="submit">
          {{pass}}
</form>
      </td>
    </tr>
  </table>
</center>

{{if auth.user:}}
<h2>Upload token:</h2>
<p>{{=token.token}}</p>
<p>{{=A('Download upload script (version 1.0 dated March 4, 2010)', _href=URL(r=request,c='default',f='upload_script'))}}</p>
{{pass}}
